package com.oms.common;

import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * @Author zhanghailong
 * @Description TODO
 * @Date 17:04 2020/3/26
 */
public class Page<T> extends com.baomidou.mybatisplus.extension.plugins.pagination.Page {


    public Page() {
        // to do nothing
    }

    /**
     * <p>
     * 分页构造函数
     * </p>
     *
     * @param current 当前页
     * @param size    每页显示条数
     */
    public Page(long current, long size) {
        super(current, size);
    }

    public Page(long current, long size, Long total) {
        super(current, size, total);
    }


    @Override
    public String toString() {
        return "Page [getRecords()=" + getRecords() + ", getTotal()=" + getTotal() + ", getSize()=" + getSize()
                + ", getCurrent()=" + getCurrent() + "]";
    }

    @Override
    @ApiModelProperty(value="当前页码")
    public long getCurrent() {
        return super.getCurrent();
    }

    @Override
    @ApiModelProperty(value="当前分页总数")
    public long getPages() {
        return super.getPages();
    }

    @Override
    @ApiModelProperty(value="当前页记录信息")
    public List<T> getRecords() {
        return super.getRecords();
    }

    @Override
    @ApiModelProperty(value="每页显示条数")
    public long getSize() {
        return super.getSize();
    }

    @Override
    @ApiModelProperty(value="当前条件下的总条数")
    public long getTotal() {
        return super.getTotal();
    }
}
